package com.cys.dm.client.base;

import com.cys.dm.entity.base.DmImage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "dm-base-provider")
@Component
public interface DmImageClient {

    @PostMapping(path = "/slideshow")
    public List<DmImage> slideshow();

    @PostMapping(path = "/findItenPicByID")
    public DmImage findItenPicByID(@RequestBody Long targetId);

    @PostMapping(path = "/findUserPicByIDAndType")
    public DmImage findUserPicByIDAndType(@RequestParam Long targetId,@RequestParam Long type);

    @PostMapping("findImage/{targetId}/{type}/{category}")
    public List<DmImage> findImage(
            @PathVariable("targetId")Long targetId,
            @PathVariable("type")Long type,
            @PathVariable("category")Long category
    );
}
